/* eslint-disable @typescript-eslint/no-empty-object-type */

// import axios from 'axios';
import { requestClient } from '#/api/request';

export namespace IqcApi {
  export interface IqcListParams {
    pageNum: number;
    pageSize: number;
  }
  export interface Params {}
  export interface Row {
    searchValue: null;
    createBy: string;
    createTime: string;
    updateBy: string;
    updateTime: null | string;
    remark: string;
    params: Params;
    iqcId: number;
    iqcCode: string;
    iqcName: string;
    templateId: number;
    sourceDocId: number;
    sourceDocType: string;
    sourceDocCode: string;
    sourceLineId: number;
    vendorId: number;
    vendorCode: string;
    vendorName: string;
    vendorNick: string;
    vendorBatch: null;
    itemId: number;
    itemCode: string;
    itemName: string;
    specification: string;
    unitOfMeasure: string;
    unitName: string;
    quantityMinCheck: number;
    quantityMaxUnqualified: number;
    quantityRecived: number;
    quantityCheck: null | number;
    quantityQualified: number;
    quantityUnqualified: number;
    crRate: number;
    majRate: number;
    minRate: number;
    crQuantity: number;
    majQuantity: number;
    minQuantity: number;
    checkResult: string;
    reciveDate: string;
    inspectDate: string;
    inspector: string;
    inspectorName: string;
    status: string;
    attr1: null;
    attr2: null;
    attr3: number;
    attr4: number;
  }
  export interface IqcListResult {
    total: number;
    rows: Row[];
    code: number;
    msg: string;
  }
}

// 获取缺陷列表
export const getIqcList = (data: IqcApi.IqcListParams) => {
  return requestClient.get<IqcApi.IqcListResult>('/mes/qc/iqc/list', {
    params: data,
  });
};
